<?php 
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.view');

class RestaurantsViewSingle extends JView
{
	function display($tpl = null)
	{
		$row =& JTable::getInstance('Review', 'Table');
		$cid = JRequest::getVar( 'cid', array(0), '', 'array' );
		$id = $cid[0];
		$row->load($id);
		$this->assignRef('row', $row);
		
		$editor =& JFactory::getEditor();
		$this->assignRef('editor', $editor);
		
		$reservations = array(
			array('value' => 'None Taken', 'text' => 'None Taken'),
			array('value' => 'Accepted', 'text' => 'Accepted'),
			array('value' => 'Suggested', 'text' => 'Suggested'),
			array('value' => 'Required', 'text' => 'Required')
		);
		
		$this->assignRef('reservations', JHTML::_('select.genericList', $reservations, 'reservations', 'class="inputbox" '. '', 'value', 'text', $row->reservations ));
		$this->assignRef('smoking', JHTML::_('select.booleanlist', 'smoking', 'class="inputbox"', $row->smoking));
		$this->assignRef('published', JHTML::_('select.booleanlist', 'published', 'class="inputbox"', $row->published));
		$this->assignRef('review_date', JHTML::_('calendar', $row->review_date, 'review_date', 'review_date'));
		
		parent::display($tpl);
	}
}